<script type="text/javascript">
        $(document).ready(function(){
<?php
//if ($this->Session->check('seeker_add')):
//        unset($_SESSION['seeker_add']);
        ?>
/*
                                $.msgbox("<p class=\"color-blue-bold\"><?php //echo __d('front', 'Alert') ?></p><div class=\"font-size-12 color-black\"><?php //echo str_replace('"', '\"', $this->Layout->sessionFlash()) ?></div>", {
                                        type    : "info",
                                        buttons : [
                                                {type: "submit", value: "<?php //echo __d('front', 'Ok') ?>"},
                                        ]
                                });           
*/
<?php //endif; ?>
</script>
<?php
$this->Blocks->set('script', $this->Html->scriptBlock('
                $(document).ready(function(){
                        $(\'.introduce-company table tr:odd\').addClass(\'odd\');
                })
'));
?>
<div class="jobs-seeker main">
        <div class="title-tab1 color-blue-bold"><?php echo __d('front', 'Quản lý hồ sơ dự tuyển'); ?></div>
        <div class="content-tab introduce-company">
                <?php echo $this->Layout->sessionFlash(); ?>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                                <th class="color-blue-bold" style="width:130px"><?php echo __d('front', 'Tiêu đề hồ sơ') ?></th>
                                <th class="color-blue-bold" style="width:100px"><?php echo __d('front', 'Mức lương') ?></th>
                                <th class="color-blue-bold" style="width:170px"><?php echo __d('front', 'Vị trí ứng tuyển') ?></th>
                                <th class="color-blue-bold" style="width:150px"><?php echo __d('front', 'Nơi làm việc') ?></th>
                                <th class="color-blue-bold"><?php echo __d('front', 'Status') ?></th>
                                <th class="color-blue-bold"><?php echo __d('front', 'Delete') ?></th>
                        </tr>
                        <?php if (count($profiles) > 0) { ?>
                                <?php 
                                        foreach ($profiles as $profile) {
                                                $city = $this->Job->implodeData(array('tag' => 'li', 'attr' => ''), $profile['Profile']['city_id'], Hash::combine($profile, 'City.{n}.City.id', 'City.{n}.City.name'));
                                ?>
                                        <tr>
                                                <td>
                                                        <?php echo $this->Html->link($profile['Profile']['title'], array('plugin'=>'jobs','controller' => 'profiles', 'action' => 'edit','id' => $profile['Profile']['id'])) ?>
                                                </td>
                                                <td><?php $salary = explode("\n",Configure::read('Jobs.salary')); echo $salary[$profile['Profile']['salary']] ?></td>
                                                <td class="color-blue"><?php $position = explode("\n",Configure::read('Jobs.position')); echo $position[$profile['Profile']['position']] ?></td>
                                                <td><?php echo '<ul>' . (!empty($city)?$city:'<li>Toàn quốc</li>') . '</ul>' ?></td>
                                                <td class="text-center">                                                        
                                                        <?php
                                                                if($profile['Profile']['status']==0){
                                                                        echo $this->Html->image('cross.png');
                                                                }else{
                                                                        echo $this->Html->image('tick.png');
                                                                }
                                                        ?>
                                                </td>
                                                <td>
                                                        <?php
                                                                echo $this->Form->postLink(__d('front','Delete'),array('plugin'=>'jobs','controller' => 'profiles', 'action' => 'delete', $profile['Profile']['id']),null,__d('front','Are you want to delete this?'));
                                                        ?>
                                                </td>                                                
                                        </tr>
                                <?php } ?>        
                        <?php } else { ?>
                                <tr>
                                        <td colspan="6"><?php echo __d('front', 'Bạn chưa đăng hồ sơ dự tuyển.') ?></td>
                                </tr>
                        <?php } ?>                                                           
                </table> 
                <div class="note padding-top-10">                        
                        <?php echo $this->Html->image('tick.png',array('style'=>'float:left;padding-right:5px')); ?> <div class="color-red" style="float:left">Đã được đăng</div>
                        <div class="clear"></div>
                        <?php echo $this->Html->image('cross.png',array('style'=>'float:left;padding-right:5px')); ?> <div class="color-red" style="float:left">Đang chờ xử lý</div>
                </div>                
        </div>
</div>
<div class="pacing"></div>
<?php if (count($profiles) < 10) { ?>
<div class="advertising">
                <?php $logos = $this->Job->getLogoHome(); ?>
                <?php if (count($logos) > 0): ?>
                    <?php foreach ($logos as $logo): ?>
            <a href="<?php echo $this->Html->Url($logo['Weblink']['link']) ?>"> <?php echo $this->Html->image($logo['Weblink']['logo'], array('alt' => $logo['Weblink']['title'])) ?></a>
                    <?php endforeach; ?>
                <?php endif ?>                

</div>
<div class="pacing"></div>
 <?php echo $this->element('feature-news') ?>
<?php echo $this->element('list_companies') ?>
<?php }?>